﻿@model blacksoft.Models.OrdenCompra

@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_LayoutCompras.cshtml";
}


<div class="block big">
    <div class="titlebar">
        <h3>Detalle Orden de Compra</h3>
    </div>
    <div class="block_cont">
        <dl class="dl-horizontal">
            <dt>
                @Html.DisplayNameFor(model => model.IDOrdenCompra)
            </dt>
            <dd>
                @Html.DisplayFor(model => model.IDOrdenCompra)
            </dd>

            <dt>
                @Html.DisplayNameFor(model => model.Fecha)
            </dt>

            <dd>
                @Html.DisplayFor(model => model.Fecha)
            </dd>

            <dt>
                @Html.DisplayNameFor(model => model.Subtotal)
            </dt>

            <dd>
                @Html.DisplayFor(model => model.Subtotal)
            </dd>

            <dt>
                @Html.DisplayNameFor(model => model.IGV)
            </dt>

            <dd>
                @Html.DisplayFor(model => model.IGV)
            </dd>

            <dt>
                @Html.DisplayNameFor(model => model.Total)
            </dt>

            <dd>
                @Html.DisplayFor(model => model.Total)
            </dd>

            <dt>
                @Html.DisplayNameFor(model => model.Estado)
            </dt>

            <dd>
                @Html.Display("strEstado")
            </dd>

            <dt>
                @Html.DisplayNameFor(model => model.Persona.RazonSocial)
            </dt>

            <dd>
                @Html.DisplayFor(model => model.Persona.RazonSocial)
            </dd>

            <dt>
                @Html.DisplayNameFor(model => model.Terminal.Nombre)
            </dt>

            <dd>
                @Html.DisplayFor(model => model.Terminal.Nombre)
            </dd>

        </dl>
        
        <div class="table">
            <table>
                <thead>
                    <tr>
                        <th>Producto</th>
                        <th>Precio</th>
                        <th>Cantidad</th>
                        <th>Subtotal</th>
                    </tr>
                </thead>
                @for (int i = 0; i < Enumerable.Count(ViewBag.OCTablaDetalle); i++)
                {
                    <tr>
                        <td>@ViewBag.OCTablaDetalle[i][0]</td>
                        <td>@ViewBag.OCTablaDetalle[i][1]</td>
                        <td>@ViewBag.OCTablaDetalle[i][2]</td>
                        <td>@ViewBag.OCTablaDetalle[i][3]</td>
                    </tr>    
                }
            </table>
        </div>
        <br />
        <p>
            @Html.ActionLink("Regresar al listado ", "Index")
        </p>
    </div>
</div>